import { defaultConfig } from "@formkit/vue";
import { zh, en } from "@formkit/i18n";

import {
  createAutoAnimatePlugin,
  createAutoHeightTextareaPlugin,
} from '@formkit/addons'
import radioAlt from "./plugins/radio-alt";
import stopImplicitSubmission from "./plugins/stop-implicit-submission";
import passwordPreventAutocomplete from "./plugins/password-prevent-autocomplete";
import requiredAsterisk from "./plugins/required-asterisk";
import autoScrollToErrors from "./plugins/auto-scroll-to-errors";
import { createThemePlugin } from "@formkit/themes";
import { genesisIcons } from '@formkit/icons'
import { rootClasses } from "./formkit.theme";

export default defaultConfig({
  plugins: [
    createThemePlugin(),
    createAutoAnimatePlugin(),
    createAutoHeightTextareaPlugin(),
    radioAlt,
    stopImplicitSubmission,
    passwordPreventAutocomplete,
    requiredAsterisk,
    autoScrollToErrors,
  ],
  locale: "zh",
  locales: { zh, en },
  icons: {
    ...genesisIcons
  },
  config: {
    rootClasses,
  },
});

